package org.ali.creationalpattern.prototypepattern;

import org.ali.creationalpattern.prototypepattern.color.Color;

/**
 * 原型模式
 */
public class Main {
    public static void main(String[] args) {
        Color red1 = ColorCache.getColor("Red");
        red1.showMessage();

        Color green1 = ColorCache.getColor("Green");
        green1.showMessage();

        Color red2 = ColorCache.getColor("Red");
        red2.showMessage();

        Color green2 = ColorCache.getColor("Green");
        green2.showMessage();
    }
}
